home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / os2 / hmakeo30.zip / Inst_Eng.cmd < prev    next >
OS/2 REXX Batch file  |  1997-04-20  |  5KB  |  132 lines

  1. /*REXX program to generate the HyperMake docu of your choice*/
  2.  
  3. "@HMAKE /TEST_IF_HERE >NUL"
  4. if \ (rc = 0) then DO
  5.   say "To create the HyperMake docu, please make sure"
  6.   say "that you have copied KBDVIO32.DLL into a directory of your"
  7.   say "LIBPATH statement, e.g. C:\OS2\DLL, and HMAKE.EXE in a"
  8.   say "directory of your PATH statement."
  9.   say "Then start MakeDocu.cmd oncemore !"
  10.   exit
  11. END
  12.  
  13. "mode 80,99"
  14. say "This HyperMake installation script generates"
  15. say "the HyperMake docu of your choice."
  16. say ""
  17. say "HyperMake can generate both IPF files and HTML files."
  18. say "You can omit the parts of the docu which aren't"
  19. say "interested for you. Select Y for yes and N for no."
  20. say "and press Return"
  21. say ""
  22. MakeIPF = "FALSE"
  23. MakeHTML = "FALSE"
  24. say "IPF files are needed to create IBM INF and HLP files."
  25. say "To create INF and HLP files from an IPF file, you need the"
  26. say "IBM IPFC Compiler."
  27. say "Are you interested in generating IPF files ?"
  28. pull YesNo
  29. Condition = ""
  30. if (YesNo = "Y") | (YesNo = "y") then DO
  31.   Condition = Condition "#IPFDOC"
  32.   "@IPFC >NUL"
  33.   if \ (rc < 2) then DO
  34.     say "To create the HyperMake docu in IBM INF format, IPFC has to be"
  35.     say "installed. But IPFC.EXE could not be found. So it's only possible"
  36.     say "to create the docu in HTML format."
  37.     say "If you have got IPFC.EXE, it's necessary that IPFC.EXE is placed"
  38.     say "in a directory placed in the PATH list or in this directory."
  39.     say "Do you want to continue ?"
  40.     pull YesNo
  41.     if (YesNo = "N") | (YesNo = "n") then EXIT
  42.   END
  43.   ELSE DO
  44.     MakeIPF = "TRUE"
  45.     say "IBM INF files are a stand alone solution. HLP files are part of"
  46.     say "a program, so if you aren't a programmer, you need not to create"
  47.     say "HLP files."
  48.     say "Are you also interested in generating HLP files ?"
  49.     pull YesNo
  50.     if (YesNo = "Y") | (YesNo = "y") then Condition = Condition "#HLPDOC"
  51.   END
  52. END
  53. say "To view HTML files, you need a Browser like IBM WebExplorer"
  54. say "or Netscape. (Netscape is better because it supports Frames"
  55. say "and colors.)"
  56. say "Are you interested in generating HTML files ?"
  57. pull YesNo
  58. if (YesNo = "Y") | (YesNo = "y") then DO
  59.   Condition = Condition "#HTMLDOC"
  60.   MakeHTML = "TRUE"
  61. END
  62. say "Are you perhaps interested in using an old DOS WordStar"
  63. say "instead of an ASCII editor ?"
  64. pull YesNo
  65. if (YesNo = "Y") | (YesNo = "y") then Condition = Condition "#WORDSTARDOC"
  66.  
  67. say "The compiler conditions you have chosen are:" Condition
  68. say ""
  69. if (MakeIPF = "FALSE") & (MakeHTML = "FALSE") then DO
  70.   say "Oops. You are neither interested in HTML files nor in IPF files."
  71.   say "Restart the install program and read the questions!"
  72.   say "press Return"
  73.   pull WaitReturn
  74.   EXIT
  75. END
  76.  
  77. say "Now HyperMake (HMAKE.EXE) is executed to create the docu"
  78. if MakeHTML = "TRUE" then DO
  79.   say "in HTML format (see filename ENGLISH\DOCU\INDEX.HTML for the content)"
  80. END
  81. if (MakeHTML = "TRUE") & (MakeIPF = "TRUE") then DO
  82.   say "and"
  83. END
  84. if MakeIPF = "TRUE" then DO
  85.   say "in IBM INF format (see filename ENGLISH\DOCU.INF)"
  86. END
  87.  
  88. say ""
  89. say "Do you want to take a look at the ASCII sources from which"
  90. say "HyperMake generates the docu?"
  91. pull YesNo
  92. if (YesNo = "Y") | (YesNo = "y") then DO
  93.   "start /f e english\sample.txt"
  94.   "start /f e english\docu.txt"
  95.   say "press Return to continue"
  96.   pull WaitReturn
  97. END
  98. if MakeHTML = "TRUE" then DO
  99.   "hmake HTML english\sample.txt /NOID" 
  100.   "hmake HTML english\docu.txt /NOID" Condition
  101.   "copy buttons\english\back.gif english\DOCU"
  102.   "copy buttons\english\forward.gif english\DOCU"
  103.   "copy buttons\english\content.gif english\DOCU"
  104.   "copy buttons\english\index.gif english\DOCU"
  105.   "copy buttons\general\homep.gif english\DOCU"
  106.   "copy buttons\icon\reddot.gif english\DOCU"
  107.   "copy buttons\icon\box.gif english\DOCU"
  108.   "copy english\DOCU\*.gif english\SAMPLE"
  109.  
  110.        Call RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'
  111.        Call SysLoadFuncs
  112.        CurrentDir = directory()
  113.        Call SysCreateObject "WPDataFile", "Index.html", CurrentDir"\english\Docu",,
  114.         "OBJECTID=<Hmake_Docu_Index>;","U"
  115.        Call SysCreateObject "WPShadow", "Index.html", CurrentDir,,
  116.         "SHADOWID=<Hmake_Docu_Index>;"
  117.        Call SysOpenObject CurrentDir"\english\Sample", ICON, TRUE
  118.  
  119. END
  120. if MakeIPF = "TRUE" then DO
  121.   "hmake IPF english\sample.txt" 
  122.   "copy english\sample.pan" 
  123.   "hmake IPF english\docu.txt" Condition
  124.   "del sample.pan" 
  125.   "IPFC /inf english\sample.ipf"
  126.   "IPFC /inf english\docu.ipf"
  127. END
  128. say ""
  129. say "The docu and the sample text has been created."
  130. say "press Return"
  131. pull WaitReturn
  132.